package org.summerframework.component.security.annotion;

import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * 用户登录验证
 *
 * @author 石超
 * @version v1.0.0
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface LoginRequired {
    @AliasFor("userIdParamNames")
    String[] value() default {};

    @AliasFor("value")
    String[] userIdParamNames() default {};

    String[] usernameParamNames() default {};

    String[] role() default {};

    /**
     * @return 是否允许外部设置此值
     */
    boolean coerce() default true;
}
